import Storage from '@/utils/storage.js';
import { LOCAL_OPTIONS, SESSION_OPTIONS } from '@/constant';

const localStore = new Storage(LOCAL_OPTIONS);
const sessionStore = new Storage(SESSION_OPTIONS);

export function setLocalStore(key, value, expire = null) {
  localStore.set(key, value, expire);
}

export function getLocalStore(key, def = null) {
  localStore.get(key, def);
}


export function setSessionStore(key, value, expire = null) {
  sessionStore.set(key, value, expire);
}

export function getSessionStore(key, def = null) {
  sessionStore.get(key, def);
}

